package com.syaccp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.syaccp.model.TCustomerBill;
import com.syaccp.model.TWithdrawalDetails;
import com.syaccp.service.TWithdrawalDetailsService;
import com.syaccp.mapper.TWithdrawalDetailsMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.sql.SQLException;
import java.util.List;

/**
 *
 */
@Service
public class TWithdrawalDetailsServiceImpl extends ServiceImpl<TWithdrawalDetailsMapper, TWithdrawalDetails>
    implements TWithdrawalDetailsService{

    @Resource
    private TWithdrawalDetailsMapper tWithdrawalDetailsMapper;

    @Override
    public List<TWithdrawalDetails> listAll(TWithdrawalDetails tWithdrawalDetails) throws SQLException {
        return tWithdrawalDetailsMapper.listAll(tWithdrawalDetails);
    }

    @Override
    public PageInfo<TWithdrawalDetails> PagingQueryWithdrawal(Integer index, TWithdrawalDetails tWithdrawalDetails) throws SQLException {
        PageHelper.startPage(index,15);
        return new PageInfo<TWithdrawalDetails>(tWithdrawalDetailsMapper.listAll(tWithdrawalDetails));
    }

    @Override
    public int updateStatus(TWithdrawalDetails tWithdrawalDetails) throws SQLException {
        return tWithdrawalDetailsMapper.updateStatus(tWithdrawalDetails);
    }

    @Override
    public int updateCustomer(TWithdrawalDetails tWithdrawalDetails) throws SQLException {
        return tWithdrawalDetailsMapper.updateCustomer(tWithdrawalDetails);
    }

    @Override
    public int updateDept(TWithdrawalDetails tWithdrawalDetails) throws SQLException {
        return tWithdrawalDetailsMapper.updateDept(tWithdrawalDetails);
    }

    @Override
    public TWithdrawalDetails WithdrawalOfCompanyBalance(TWithdrawalDetails tWithdrawalDetails) throws SQLException {
        return tWithdrawalDetailsMapper.WithdrawalOfCompanyBalance(tWithdrawalDetails);
    }

    @Override
    public int updateCustomer1(TWithdrawalDetails tWithdrawalDetails) throws SQLException {
        return tWithdrawalDetailsMapper.updateCustomer1(tWithdrawalDetails);
    }

    @Override
    public int updateDept1(TWithdrawalDetails tWithdrawalDetails) throws SQLException {
        return tWithdrawalDetailsMapper.updateDept1(tWithdrawalDetails);
    }


    @Override
    public TWithdrawalDetails information() {
        return tWithdrawalDetailsMapper.information();
    }

    @Override
    public List<TWithdrawalDetails> queryCondition(Integer status) {
        return tWithdrawalDetailsMapper.queryCondition(status);
    }

    @Override
    public int alterTheState(TWithdrawalDetails details) {
        return tWithdrawalDetailsMapper.alterTheState(details);
    }

    @Override
    public int insertRemark(TWithdrawalDetails withdrawalDetails) throws SQLException {
        return tWithdrawalDetailsMapper.insertRemark(withdrawalDetails);
    }

    @Override
    public int updateState(TWithdrawalDetails withdrawalDetails) throws SQLException {
        return tWithdrawalDetailsMapper.updateState(withdrawalDetails);
    }
}




